package com.lin.cms.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import com.lin.cms.criteria.ChannelCriteria;
import com.lin.cms.domain.Channel;

public interface ChannelMapper{
	
	Channel selectByPrimaryKey(Integer channelId);
	
	List<Channel> selectByCriteria(ChannelCriteria criteria);
	
	int deleteByPrimaryKey(Integer channelId);
	
	int deleteByCriteria(ChannelCriteria criteria);
	
	int insert(Channel channel);
	
	int updateByPrimaryKeySelective(Channel channel);
	
	int updateByPrimaryKey(Channel channel);
	
	List<Channel> selectByPage(ChannelCriteria criteria,RowBounds bounds);
	 
	int countByCriteria(ChannelCriteria criteria);
	
	public List<Channel> getTopList(@Param("siteId") Integer siteId, @Param("hasContentOnly") boolean hasContentOnly,@Param("displayOnly") boolean displayOnly);
	
	public List<Channel> getChildList(@Param("parentId") Integer parentId, @Param("hasContentOnly")boolean hasContentOnly,@Param("displayOnly") boolean displayOnly);
    
}
